package top.zhangjianyong.tools.generation;

import com.alibaba.dashscope.common.Message;
import com.alibaba.dashscope.common.Role;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhangjianyong
 * @since 2025/3/21 下午12:04
 */
public class GenerationMessage {
    private static Message createMessage(Role role, String content) {
        return Message.builder()
                .role(role.getValue())
                .content(content)
                .build();
    }

    public static List<Message> createMessages() {
        List<Message> list = new ArrayList<>();
        list.add(createSystemMessage());
        return list;
    }

    public static Message createSystemMessage() {
        return createMessage(Role.SYSTEM, "你叫小小A，是一个聊天机器人，擅长幽默风趣的聊天风格");
    }

    public static Message createUserMessage(String content) {
        return createMessage(Role.USER, content);
    }

}
